package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class SequenceGeneratorDataTypeOption implements SequenceGeneratorOption {

    private int beginIndex;
    private int endIndex;
    private DataType dataType;

    public SequenceGeneratorDataTypeOption(int beginIndex, DataType dataType) {
        this.beginIndex = beginIndex;
        this.endIndex = dataType.getEndIndex();
        this.dataType = dataType;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public DataType getDataType() {
        return dataType;
    }

}
